/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * NuevoLlamado.java
 *
 * Created on 19-ene-2013, 12:58:01
 */
package gui;

import com.sun.awt.AWTUtilities;
import controladores.ControladorPrincipal;
import io.Actualizacion;
import io.Caso;
import io.Llamado;
import io.Operador;
import io.TipoLlamado;
import java.awt.Image;
import java.awt.Shape;
import java.awt.geom.RoundRectangle2D;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Iterator;
import javax.swing.DefaultComboBoxModel;
import javax.swing.ImageIcon;
import javax.swing.JSpinner;
import javax.swing.SpinnerDateModel;
import javax.swing.table.DefaultTableModel;
import utilidades.JFrameConFondo;

/**
 *
 * @author NiCo
 */
public class ModificarLlamado extends JFrameConFondo {

    private Image icono = new ImageIcon(getClass().getResource("/imagenes/logo.png")).getImage();
    private SimpleDateFormat sdf = new java.text.SimpleDateFormat("dd/MM/yyyy");
    private SimpleDateFormat sdf1 = new java.text.SimpleDateFormat("HH:mm");

    /** Creates new form NuevoLlamado */
    public ModificarLlamado() {
        initComponents();
        SpinnerDateModel sm = new SpinnerDateModel(new Date(), null, null, Calendar.HOUR_OF_DAY);
        dtpHora.setModel(sm);
        JSpinner.DateEditor de = new JSpinner.DateEditor(dtpHora, "HH:mm");
        dtpHora.setEditor(de);
        cboOperador.setModel(new DefaultComboBoxModel(ControladorPrincipal.getInstance().getControladorPersonas().listaOperadores().toArray()));
        cboOperador.setSelectedIndex(-1);
        SpinnerDateModel sm1 = new SpinnerDateModel(new Date(), null, null, Calendar.HOUR_OF_DAY);
        dtpHora1.setModel(sm1);
        JSpinner.DateEditor de1 = new JSpinner.DateEditor(dtpHora, "HH:mm");
        dtpHora1.setEditor(de1);
        cboOperador1.setModel(new DefaultComboBoxModel(ControladorPrincipal.getInstance().getControladorPersonas().listaOperadores().toArray()));
        cboOperador1.setSelectedIndex(-1);
        cboTipoLlamado.setSelectedIndex(-1);
        cboTipoLlamado1.setSelectedIndex(-1);
        cboTipoLlamado1.setEnabled(false);

        dtpFecha.setDate(new Date());
        dtpFecha1.setDate(new Date());
                
        Iterator<Llamado> it = ControladorPrincipal.getInstance().getControladorCasos().llamadosPendientes().iterator();
        Object[] obj = null;
        DefaultTableModel modelo = (DefaultTableModel) tlbLlamados.getModel();
        while (it.hasNext()) {
            Llamado llamado = it.next();
            obj = new Object[8];
            obj[0] = llamado;
            obj[1] = sdf.format(llamado.getFecha());
            obj[2] = sdf1.format(llamado.getHora());
            if (llamado.getCaso() != null) {
                obj[3] = llamado.getCaso().toString();
            }
            if (llamado.getActualizacion() != null) {
                obj[3] = llamado.getActualizacion().getCaso().toString();
                obj[4] = "SI";
            } else {
                obj[4] = "NO";
            }
            if (llamado.isInfo_asesoramiento()) {
                obj[5] = "SI";
            } else {
                obj[5] = "NO";
            }
            if (llamado.isInstitucion()) {
                obj[6] = "SI";
            } else {
                obj[6] = "NO";
            }
            if (llamado.isParticular()) {
                obj[7] = "SI";
            } else {
                obj[7] = "NO";
            }
            modelo.addRow(obj);
        }


    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        btnCerrar = new javax.swing.JButton();
        btnMinimizar = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel2 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tlbLlamados = new javax.swing.JTable();
        jPanel3 = new javax.swing.JPanel();
        cboOperador = new javax.swing.JComboBox();
        dtpHora = new javax.swing.JSpinner();
        dtpFecha = new com.toedter.calendar.JDateChooser();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        chkInfoAse = new javax.swing.JCheckBox();
        chkInsMun = new javax.swing.JCheckBox();
        chkParticular = new javax.swing.JCheckBox();
        jLabel2 = new javax.swing.JLabel();
        cboTipoLlamado = new javax.swing.JComboBox();
        btnGuardar = new javax.swing.JButton();
        jPanel1 = new javax.swing.JPanel();
        jPanel4 = new javax.swing.JPanel();
        cboOperador1 = new javax.swing.JComboBox();
        dtpHora1 = new javax.swing.JSpinner();
        dtpFecha1 = new com.toedter.calendar.JDateChooser();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        chkInfoAse1 = new javax.swing.JCheckBox();
        chkInsMun1 = new javax.swing.JCheckBox();
        chkParticular1 = new javax.swing.JCheckBox();
        chkBroma = new javax.swing.JCheckBox();
        jLabel10 = new javax.swing.JLabel();
        cboTipoLlamado1 = new javax.swing.JComboBox();
        btnGuardar1 = new javax.swing.JButton();
        jScrollPane2 = new javax.swing.JScrollPane();
        tlbLlamados1 = new javax.swing.JTable();
        jLabel9 = new javax.swing.JLabel();
        dtpFecha2 = new com.toedter.calendar.JDateChooser();
        jButton1 = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        btnCerrar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/cerrar-normal.png"))); // NOI18N
        btnCerrar.setBorder(null);
        btnCerrar.setBorderPainted(false);
        btnCerrar.setFocusPainted(false);
        btnCerrar.setName("btnCerrar"); // NOI18N
        btnCerrar.setOpaque(false);
        btnCerrar.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                btnCerrarMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                btnCerrarMouseExited(evt);
            }
            public void mousePressed(java.awt.event.MouseEvent evt) {
                btnCerrarMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                btnCerrarMouseReleased(evt);
            }
        });
        btnCerrar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCerrarActionPerformed(evt);
            }
        });

        btnMinimizar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/minimizar-normal.png"))); // NOI18N
        btnMinimizar.setBorder(null);
        btnMinimizar.setBorderPainted(false);
        btnMinimizar.setFocusPainted(false);
        btnMinimizar.setName("btnMinimizar"); // NOI18N
        btnMinimizar.setOpaque(false);
        btnMinimizar.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                btnMinimizarMouseEntered(evt);
            }
            public void mouseExited(java.awt.event.MouseEvent evt) {
                btnMinimizarMouseExited(evt);
            }
            public void mousePressed(java.awt.event.MouseEvent evt) {
                btnMinimizarMousePressed(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                btnMinimizarMouseReleased(evt);
            }
        });
        btnMinimizar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnMinimizarActionPerformed(evt);
            }
        });

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/titulo-modificar-llamado.png"))); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N

        jTabbedPane1.setName("jTabbedPane1"); // NOI18N

        jPanel2.setName("jPanel2"); // NOI18N

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        tlbLlamados.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Operador", "Fecha", "Hora", "Caso", "Actualización", "Inform. asesor.", "Inst. munic.", "Particular"
            }
        ));
        tlbLlamados.setName("tlbLlamados"); // NOI18N
        tlbLlamados.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tlbLlamadosMouseClicked(evt);
            }
        });
        jScrollPane1.setViewportView(tlbLlamados);

        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Datos del llamado", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N
        jPanel3.setName("jPanel3"); // NOI18N

        cboOperador.setFont(new java.awt.Font("Tahoma", 0, 12));
        cboOperador.setEnabled(false);
        cboOperador.setName("cboOperador"); // NOI18N

        dtpHora.setFont(new java.awt.Font("Tahoma", 0, 12));
        dtpHora.setEnabled(false);
        dtpHora.setName("dtpHora"); // NOI18N

        dtpFecha.setDateFormatString("dd/MM/yyyy");
        dtpFecha.setEnabled(false);
        dtpFecha.setFont(new java.awt.Font("Tahoma", 0, 12));
        dtpFecha.setName("dtpFecha"); // NOI18N

        jLabel4.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel4.setText("Hora");
        jLabel4.setName("jLabel4"); // NOI18N

        jLabel5.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel5.setText("Operador/a");
        jLabel5.setName("jLabel5"); // NOI18N

        jLabel3.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel3.setText("Fecha");
        jLabel3.setName("jLabel3"); // NOI18N

        chkInfoAse.setFont(new java.awt.Font("Tahoma", 0, 12));
        chkInfoAse.setText("Inform. asesoramiento");
        chkInfoAse.setName("chkInfoAse"); // NOI18N

        chkInsMun.setFont(new java.awt.Font("Tahoma", 0, 12));
        chkInsMun.setText("Institución municipal");
        chkInsMun.setName("chkInsMun"); // NOI18N

        chkParticular.setFont(new java.awt.Font("Tahoma", 0, 12));
        chkParticular.setText("Particular");
        chkParticular.setName("chkParticular"); // NOI18N

        jLabel2.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel2.setText("Seleccione un tipo de llamado");
        jLabel2.setName("jLabel2"); // NOI18N

        cboTipoLlamado.setFont(new java.awt.Font("Tahoma", 0, 12));
        cboTipoLlamado.setModel(new DefaultComboBoxModel(TipoLlamado.values()));
        cboTipoLlamado.setName("cboTipoLlamado"); // NOI18N

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel5)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cboOperador, javax.swing.GroupLayout.PREFERRED_SIZE, 215, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(27, 27, 27)
                .addComponent(jLabel3)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(dtpFecha, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(57, 57, 57)
                .addComponent(jLabel4)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(dtpHora, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(20, 20, 20))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()
                .addGap(52, 52, 52)
                .addComponent(chkInfoAse)
                .addGap(86, 86, 86)
                .addComponent(chkInsMun)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 107, Short.MAX_VALUE)
                .addComponent(chkParticular)
                .addGap(59, 59, 59))
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(cboTipoLlamado, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(279, Short.MAX_VALUE))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel4)
                        .addComponent(dtpHora, javax.swing.GroupLayout.PREFERRED_SIZE, 21, Short.MAX_VALUE))
                    .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(cboOperador, javax.swing.GroupLayout.DEFAULT_SIZE, 20, Short.MAX_VALUE)
                            .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addComponent(jLabel5, javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(dtpFecha, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 20, Short.MAX_VALUE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(chkInfoAse)
                    .addComponent(chkParticular)
                    .addComponent(chkInsMun))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(cboTipoLlamado, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        btnGuardar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/guardar-usuario.png"))); // NOI18N
        btnGuardar.setBorderPainted(false);
        btnGuardar.setFocusPainted(false);
        btnGuardar.setName("btnGuardar"); // NOI18N
        btnGuardar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnGuardarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel2Layout.createSequentialGroup()
                            .addContainerGap()
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 673, Short.MAX_VALUE))
                        .addGroup(jPanel2Layout.createSequentialGroup()
                            .addGap(267, 267, 267)
                            .addComponent(btnGuardar, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 30, Short.MAX_VALUE)
                .addComponent(btnGuardar, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        jTabbedPane1.addTab("", new javax.swing.ImageIcon(getClass().getResource("/imagenes/llamados-pendientes.png")), jPanel2); // NOI18N

        jPanel1.setName("jPanel1"); // NOI18N
        jPanel1.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                jPanel1FocusGained(evt);
            }
        });

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Datos del llamado", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12))); // NOI18N
        jPanel4.setName("jPanel4"); // NOI18N

        cboOperador1.setFont(new java.awt.Font("Tahoma", 0, 12));
        cboOperador1.setName("cboOperador1"); // NOI18N

        dtpHora1.setFont(new java.awt.Font("Tahoma", 0, 12));
        dtpHora1.setName("dtpHora1"); // NOI18N

        dtpFecha1.setDateFormatString("dd/MM/yyyy");
        dtpFecha1.setFont(new java.awt.Font("Tahoma", 0, 12));
        dtpFecha1.setName("dtpFecha1"); // NOI18N

        jLabel6.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel6.setText("Hora");
        jLabel6.setName("jLabel6"); // NOI18N

        jLabel7.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel7.setText("Operador/a");
        jLabel7.setName("jLabel7"); // NOI18N

        jLabel8.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel8.setText("Fecha");
        jLabel8.setName("jLabel8"); // NOI18N

        chkInfoAse1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        chkInfoAse1.setText("Inform. asesoramiento");
        chkInfoAse1.setName("chkInfoAse1"); // NOI18N

        chkInsMun1.setFont(new java.awt.Font("Tahoma", 0, 12));
        chkInsMun1.setText("Institución municipal");
        chkInsMun1.setName("chkInsMun1"); // NOI18N

        chkParticular1.setFont(new java.awt.Font("Tahoma", 0, 12));
        chkParticular1.setText("Particular");
        chkParticular1.setName("chkParticular1"); // NOI18N

        chkBroma.setFont(new java.awt.Font("Tahoma", 0, 12));
        chkBroma.setText("Broma / Otros");
        chkBroma.setName("chkBroma"); // NOI18N

        jLabel10.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel10.setText("Seleccione un tipo de llamado");
        jLabel10.setName("jLabel10"); // NOI18N

        cboTipoLlamado1.setFont(new java.awt.Font("Tahoma", 0, 12));
        cboTipoLlamado1.setModel(new DefaultComboBoxModel(TipoLlamado.values()));
        cboTipoLlamado1.setName("cboTipoLlamado1"); // NOI18N

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jLabel7)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(cboOperador1, javax.swing.GroupLayout.PREFERRED_SIZE, 215, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(40, 40, 40)
                        .addComponent(jLabel8)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(dtpFecha1, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(50, 50, 50)
                        .addComponent(jLabel6)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(dtpHora1, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap(20, Short.MAX_VALUE))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel4Layout.createSequentialGroup()
                                .addComponent(chkInfoAse1)
                                .addGap(58, 58, 58)
                                .addComponent(chkInsMun1)
                                .addGap(67, 67, 67)
                                .addComponent(chkParticular1)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(chkBroma))
                            .addGroup(jPanel4Layout.createSequentialGroup()
                                .addComponent(jLabel10)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(cboTipoLlamado1, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(66, 66, 66))))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel6)
                        .addComponent(dtpHora1, javax.swing.GroupLayout.PREFERRED_SIZE, 21, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(cboOperador1, javax.swing.GroupLayout.DEFAULT_SIZE, 21, Short.MAX_VALUE)
                            .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addComponent(jLabel7, javax.swing.GroupLayout.Alignment.LEADING))
                    .addComponent(dtpFecha1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(chkInfoAse1)
                    .addComponent(chkInsMun1)
                    .addComponent(chkParticular1)
                    .addComponent(chkBroma))
                .addGap(7, 7, 7)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel10)
                    .addComponent(cboTipoLlamado1, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12))
        );

        btnGuardar1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/guardar-usuario.png"))); // NOI18N
        btnGuardar1.setBorderPainted(false);
        btnGuardar1.setFocusPainted(false);
        btnGuardar1.setName("btnGuardar1"); // NOI18N
        btnGuardar1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnGuardar1ActionPerformed(evt);
            }
        });

        jScrollPane2.setName("jScrollPane2"); // NOI18N

        tlbLlamados1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Operador", "Fecha", "Hora", "Inform. asesor.", "Inst. munic.", "Particular"
            }
        ));
        tlbLlamados1.setName("tlbLlamados1"); // NOI18N
        tlbLlamados1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tlbLlamados1MouseClicked(evt);
            }
        });
        jScrollPane2.setViewportView(tlbLlamados1);

        jLabel9.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel9.setText("Seleccione una fecha");
        jLabel9.setName("jLabel9"); // NOI18N

        dtpFecha2.setDateFormatString("dd/MM/yyyy");
        dtpFecha2.setFont(new java.awt.Font("Tahoma", 0, 12));
        dtpFecha2.setName("dtpFecha2"); // NOI18N

        jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/ver-llamados.png"))); // NOI18N
        jButton1.setBorderPainted(false);
        jButton1.setFocusPainted(false);
        jButton1.setName("jButton1"); // NOI18N
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(267, 267, 267)
                        .addComponent(btnGuardar1, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 673, Short.MAX_VALUE)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabel9)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(dtpFecha2, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(jLabel9, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(dtpFecha2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnGuardar1, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        jTabbedPane1.addTab("", new javax.swing.ImageIcon(getClass().getResource("/imagenes/llamados-otros.png")), jPanel1); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 698, Short.MAX_VALUE))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(278, 278, 278)
                        .addComponent(jLabel1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 215, Short.MAX_VALUE)
                        .addComponent(btnMinimizar)
                        .addGap(6, 6, 6)
                        .addComponent(btnCerrar)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnMinimizar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnCerrar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 378, Short.MAX_VALUE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnCerrarMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnCerrarMouseEntered

        btnCerrar.setIcon(new ImageIcon(getClass().getResource("/imagenes/cerrar-activo.png")));     }//GEN-LAST:event_btnCerrarMouseEntered

    private void btnCerrarMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnCerrarMouseExited

        btnCerrar.setIcon(new ImageIcon(getClass().getResource("/imagenes/cerrar-normal.png")));     }//GEN-LAST:event_btnCerrarMouseExited

    private void btnCerrarMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnCerrarMousePressed

        btnCerrar.setIcon(new ImageIcon(getClass().getResource("/imagenes/cerrar-click.png")));     }//GEN-LAST:event_btnCerrarMousePressed

    private void btnCerrarMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnCerrarMouseReleased

        btnCerrar.setIcon(new ImageIcon(getClass().getResource("/imagenes/cerrar-normal.png")));     }//GEN-LAST:event_btnCerrarMouseReleased

    private void btnMinimizarMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnMinimizarMouseEntered

        btnMinimizar.setIcon(new ImageIcon(getClass().getResource("/imagenes/minimizar-activo.png")));     }//GEN-LAST:event_btnMinimizarMouseEntered

    private void btnMinimizarMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnMinimizarMouseExited

        btnMinimizar.setIcon(new ImageIcon(getClass().getResource("/imagenes/minimizar-normal.png")));     }//GEN-LAST:event_btnMinimizarMouseExited

    private void btnMinimizarMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnMinimizarMousePressed

        btnMinimizar.setIcon(new ImageIcon(getClass().getResource("/imagenes/minimizar-click.png")));     }//GEN-LAST:event_btnMinimizarMousePressed

    private void btnMinimizarMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnMinimizarMouseReleased

        btnMinimizar.setIcon(new ImageIcon(getClass().getResource("/imagenes/minimizar-normal.png")));     }//GEN-LAST:event_btnMinimizarMouseReleased

    private void btnMinimizarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnMinimizarActionPerformed

        this.setExtendedState(Principal.ICONIFIED);     }//GEN-LAST:event_btnMinimizarActionPerformed

    private void btnCerrarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCerrarActionPerformed
        this.dispose();
    }//GEN-LAST:event_btnCerrarActionPerformed

    private void btnGuardar1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGuardar1ActionPerformed
        if (tlbLlamados1.getSelectedRow() != -1) {
            DefaultTableModel modelo = (DefaultTableModel) tlbLlamados1.getModel();
            int i = tlbLlamados1.getSelectedRow();
            Llamado llamado = (Llamado) modelo.getValueAt(i, 0);
            llamado.setOperador((Operador) cboOperador1.getSelectedItem());
            llamado.setFecha(dtpFecha1.getDate());
            llamado.setHora((Date) dtpHora1.getValue());
            llamado.setInfo_asesoramiento(chkInfoAse1.isSelected());
            llamado.setInstitucion(chkInsMun1.isSelected());
            llamado.setParticular(chkParticular1.isSelected());
            llamado.setBroma_otros(chkBroma.isSelected());
            ControladorPrincipal.getInstance().guardar(llamado);
            modelo.setValueAt(llamado, i, 0);
            modelo.setValueAt(sdf.format(llamado.getFecha()), i, 1);
            modelo.setValueAt(sdf1.format(llamado.getHora()), i, 2);
            modelo.setValueAt(llamado, i, 4);
            modelo.setValueAt(llamado, i, 5);
            if (llamado.isInfo_asesoramiento()) {
                modelo.setValueAt("SI", i, 3);
            } else {
                modelo.setValueAt("NO", i, 3);
            }
            if (llamado.isInstitucion()) {
                modelo.setValueAt("SI", i, 4);
            } else {
                modelo.setValueAt("NO", i, 4);
            }
            if (llamado.isParticular()) {
                modelo.setValueAt("SI", i, 5);
            } else {
                modelo.setValueAt("NO", i, 5);
            }

            if (llamado.getCaso() != null) {
                Caso caso = llamado.getCaso();
                caso.setTipoCaso((TipoLlamado) cboTipoLlamado1.getSelectedItem());
                ControladorPrincipal.getInstance().guardar(caso);
            } else {
                if (llamado.getActualizacion() != null) {
                    Actualizacion actualizacion = llamado.getActualizacion();
                    actualizacion.setTipoLlamado((TipoLlamado) cboTipoLlamado1.getSelectedItem());
                    ControladorPrincipal.getInstance().guardar(actualizacion);
                }
            }
            cboOperador1.setSelectedIndex(-1);
            cboTipoLlamado1.setSelectedIndex(-1);
            dtpFecha1.setDate(null);
            chkInfoAse1.setSelected(false);
            chkInsMun1.setSelected(false);
            chkParticular1.setSelected(false);
            chkBroma.setSelected(false);

            MensajesInfo p1 = new MensajesInfo('n', "GuardarExito");
            p1.setLocationRelativeTo(null);
            p1.setIconImage(icono);
            p1.setVisible(true);
            Shape shape = new RoundRectangle2D.Float(0, 0, p1.getWidth(), p1.getHeight(), 30, 30);
            AWTUtilities.setWindowShape(p1, shape);
        } else {
            MensajesInfo p1 = new MensajesInfo('e', "SeleccionLlamado");
            p1.setLocationRelativeTo(null);
            p1.setIconImage(icono);
            p1.setVisible(true);
            Shape shape = new RoundRectangle2D.Float(0, 0, p1.getWidth(), p1.getHeight(), 30, 30);
            AWTUtilities.setWindowShape(p1, shape);
        }
    }//GEN-LAST:event_btnGuardar1ActionPerformed

    private void tlbLlamadosMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tlbLlamadosMouseClicked
        if (tlbLlamados.getSelectedRow() != -1) {
            Llamado llamado = (Llamado) tlbLlamados.getValueAt(tlbLlamados.getSelectedRow(), 0);
            cboOperador.setSelectedItem(llamado.getOperador());
            dtpFecha.setDate(llamado.getFecha());
            dtpHora.setValue(llamado.getHora());
            chkInfoAse.setSelected(llamado.isInfo_asesoramiento());
            chkInsMun.setSelected(llamado.isInstitucion());
            chkParticular.setSelected(llamado.isParticular());
        }
    }//GEN-LAST:event_tlbLlamadosMouseClicked

    private void btnGuardarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGuardarActionPerformed
        if (tlbLlamados.getSelectedRow() != -1) {
            if (cboTipoLlamado.getSelectedItem() != null) {
                DefaultTableModel modelo = (DefaultTableModel) tlbLlamados.getModel();
                Llamado llamado = (Llamado) modelo.getValueAt(tlbLlamados.getSelectedRow(), 0);
                llamado.setInfo_asesoramiento(chkInfoAse.isSelected());
                llamado.setInstitucion(chkInsMun.isSelected());
                llamado.setParticular(chkParticular.isSelected());
                llamado.setPendiente(false);
                ControladorPrincipal.getInstance().guardar(llamado);
                modelo.removeRow(tlbLlamados.getSelectedRow());

                if (llamado.getCaso() != null) {
                    Caso caso = llamado.getCaso();
                    caso.setTipoCaso((TipoLlamado) cboTipoLlamado.getSelectedItem());
                    ControladorPrincipal.getInstance().guardar(caso);
                } else {
                    if (llamado.getActualizacion() != null) {
                        Actualizacion actualizacion = llamado.getActualizacion();
                        actualizacion.setTipoLlamado((TipoLlamado) cboTipoLlamado.getSelectedItem());
                        ControladorPrincipal.getInstance().guardar(actualizacion);
                    }
                }

                cboOperador.setSelectedIndex(-1);
                dtpFecha.setDate(null);
                chkInfoAse.setSelected(false);
                chkInsMun.setSelected(false);
                chkParticular.setSelected(false);
                cboTipoLlamado.setSelectedIndex(-1);

                MensajesInfo p1 = new MensajesInfo('n', "GuardarExito");
                p1.setLocationRelativeTo(null);
                p1.setIconImage(icono);
                p1.setVisible(true);
                Shape shape = new RoundRectangle2D.Float(0, 0, p1.getWidth(), p1.getHeight(), 30, 30);
                AWTUtilities.setWindowShape(p1, shape);
            } else {
                MensajesInfo p1 = new MensajesInfo('e', "CamposVacios");
                p1.setLocationRelativeTo(null);
                p1.setIconImage(icono);
                p1.setVisible(true);
                Shape shape = new RoundRectangle2D.Float(0, 0, p1.getWidth(), p1.getHeight(), 30, 30);
                AWTUtilities.setWindowShape(p1, shape);
            }
        } else {
            MensajesInfo p1 = new MensajesInfo('e', "SeleccionLlamado");
            p1.setLocationRelativeTo(null);
            p1.setIconImage(icono);
            p1.setVisible(true);
            Shape shape = new RoundRectangle2D.Float(0, 0, p1.getWidth(), p1.getHeight(), 30, 30);
            AWTUtilities.setWindowShape(p1, shape);
        }
    }//GEN-LAST:event_btnGuardarActionPerformed

    private void tlbLlamados1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tlbLlamados1MouseClicked
        if (tlbLlamados1.getSelectedRow() != -1) {
            Llamado llamado = (Llamado) tlbLlamados1.getValueAt(tlbLlamados1.getSelectedRow(), 0);
            if (llamado.getCaso() == null && llamado.getActualizacion() == null) {
                cboOperador1.setEnabled(true);
                dtpFecha1.setEnabled(true);
                dtpHora1.setEnabled(true);
                chkBroma.setEnabled(true);
                chkBroma.setSelected(false);
                cboTipoLlamado1.setEnabled(false);
                cboOperador1.setSelectedItem(llamado.getOperador());
                dtpFecha1.setDate(llamado.getFecha());
                dtpHora1.setValue(llamado.getHora());
                chkInfoAse1.setSelected(llamado.isInfo_asesoramiento());
                chkInsMun1.setSelected(llamado.isInstitucion());
                chkParticular1.setSelected(llamado.isParticular());
                chkBroma.setSelected(llamado.isBroma_otros());
            } else {
                cboOperador1.setEnabled(false);
                dtpFecha1.setEnabled(false);
                dtpHora1.setEnabled(false);
                chkBroma.setEnabled(false);
                cboTipoLlamado1.setEnabled(true);
                cboOperador1.setSelectedItem(llamado.getOperador());
                dtpFecha1.setDate(llamado.getFecha());
                dtpHora1.setValue(llamado.getHora());
                chkInfoAse1.setSelected(llamado.isInfo_asesoramiento());
                chkInsMun1.setSelected(llamado.isInstitucion());
                chkParticular1.setSelected(llamado.isParticular());
                if (llamado.getCaso() != null) {
                    cboTipoLlamado1.setSelectedItem(llamado.getCaso().getTipoCaso());
                } else {
                    if (llamado.getActualizacion() != null) {
                        cboTipoLlamado1.setSelectedItem(llamado.getActualizacion().getTipoLlamado());
                    }
                }
            }
        }
    }//GEN-LAST:event_tlbLlamados1MouseClicked

    private void jPanel1FocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_jPanel1FocusGained
    }//GEN-LAST:event_jPanel1FocusGained

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        if (dtpFecha2.getDate() != null) {
            DefaultTableModel modelo = (DefaultTableModel) tlbLlamados1.getModel();
            int i = tlbLlamados1.getRowCount();
            for (int j = 0; j < i; j++) {
                modelo.removeRow(0);
            }
            cboOperador1.setSelectedIndex(-1);
            cboTipoLlamado1.setSelectedIndex(-1);
            dtpFecha1.setDate(null);
            chkInfoAse1.setSelected(false);
            chkInsMun1.setSelected(false);
            chkParticular1.setSelected(false);
            chkBroma.setSelected(false);
            Iterator<Llamado> it = ControladorPrincipal.getInstance().getControladorCasos().otrosLlamados(dtpFecha2.getDate()).iterator();
            Object[] obj = null;
            while (it.hasNext()) {
                Llamado llamado = it.next();
                obj = new Object[6];
                obj[0] = llamado;
                obj[1] = sdf.format(llamado.getFecha());
                obj[2] = sdf1.format(llamado.getHora());
                if (llamado.isInfo_asesoramiento()) {
                    obj[3] = "SI";
                } else {
                    obj[3] = "NO";
                }
                if (llamado.isInstitucion()) {
                    obj[4] = "SI";
                } else {
                    obj[4] = "NO";
                }
                if (llamado.isParticular()) {
                    obj[5] = "SI";
                } else {
                    obj[5] = "NO";
                }
                modelo.addRow(obj);
            }
        } else {
            MensajesInfo p1 = new MensajesInfo('e', "Fecha");
            p1.setLocationRelativeTo(null);
            p1.setIconImage(icono);
            p1.setVisible(true);
            Shape shape = new RoundRectangle2D.Float(0, 0, p1.getWidth(), p1.getHeight(), 30, 30);
            AWTUtilities.setWindowShape(p1, shape);
        }
    }//GEN-LAST:event_jButton1ActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnCerrar;
    private javax.swing.JButton btnGuardar;
    private javax.swing.JButton btnGuardar1;
    private javax.swing.JButton btnMinimizar;
    private javax.swing.JComboBox cboOperador;
    private javax.swing.JComboBox cboOperador1;
    private javax.swing.JComboBox cboTipoLlamado;
    private javax.swing.JComboBox cboTipoLlamado1;
    private javax.swing.JCheckBox chkBroma;
    private javax.swing.JCheckBox chkInfoAse;
    private javax.swing.JCheckBox chkInfoAse1;
    private javax.swing.JCheckBox chkInsMun;
    private javax.swing.JCheckBox chkInsMun1;
    private javax.swing.JCheckBox chkParticular;
    private javax.swing.JCheckBox chkParticular1;
    private com.toedter.calendar.JDateChooser dtpFecha;
    private com.toedter.calendar.JDateChooser dtpFecha1;
    private com.toedter.calendar.JDateChooser dtpFecha2;
    private javax.swing.JSpinner dtpHora;
    private javax.swing.JSpinner dtpHora1;
    private javax.swing.JButton jButton1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTable tlbLlamados;
    private javax.swing.JTable tlbLlamados1;
    // End of variables declaration//GEN-END:variables
}
